﻿using System;
using System.Collections.Generic;
using System.Text;
using Slwy.EventBus.Models;
using Slwy.FrameCore.Dependency;
using SqlSugar;

namespace Slwy.EventBus.Interfaces
{
    public interface IEventListen : ISingletonDependency
    {
        /// <summary>
        /// 待发送的事件
        /// 这里的事件需要等到数据库事务提交成功后发送
        /// </summary>
        IDictionary<string, EventInfoEntity> PendEventInfos { get; set; }

        /// <summary>
        /// 数据库事务执行成功后回调本方法
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool OnSaveChanged(SqlSugarClient sqlSugarClient, string dbName);
    }
}
